<!--
 * @Description: 
 * @Author: ljl
 * @Date: 2025-05-13 09:50:27
 * @LastEditors: rendc
 * @LastEditTime: 2025-05-13 09:59:12
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 声明字体图标 自立要注意路径变化*/
        @font-face {
            font-family: 'icomoon';
            src:  url('../fonts/icomoon.eot?27fiuh');
            src:  url('../fonts/icomoon.eot?27fiuh#iefix') format('embedded-opentype'),
            url('../fonts/icomoon.ttf?27fiuh') format('truetype'),
            url('../fonts/icomoon.woff?27fiuh') format('woff'),
            url('../fonts/icomoon.svg?27fiuh#icomoon') format('svg');
            font-weight: normal;
            font-style: normal;
            font-display: block;
        }
        .shopcar{
            /* position: absolute; */
            /* top: 25px; */
            /* right: 60px; */
            width: 140px;
            height: 35px;
            border: 1px solid #dfdfdf;
            background-color: #f7f7f7;
            line-height: 35px;
            text-align: center;
        }
        .shopcar::before{
            content: '\e909';
            font-family: 'icomoon';
            margin-right: 5px;
            color: #c81623;
        }
        .one {
            position: relative;
            width: 15px;
            height: 15px;
            border: 1px solid #000;
            padding: 20px;
        }

        /* 三角可以通过盒子来制作，不一定非得字体图标 */
        /* 让一个旋转45度的正方形（菱形）的两个边框显示出来 */
        .one::after {
            content: "";
            position: absolute;
            /* top: 8px; */
            /* right: 15px; */
            width: 10px;
            height: 10px;
            border-right: 1px solid #000;
            border-bottom: 1px solid #000;
            transform: rotate(45deg);
            transition: all 0.2s;
        }

        /* 鼠标经过 div 里面的三角旋转 */
        .one:hover::after {
            /* transform: translateY(-25%) rotate(-135deg); */
            transform: rotate(225deg);
        }
    </style>
</head>
<body>
    <!-- 方法1 -->
    <div class="shopcar">我的购物车</div>
    <!-- 方法2 -->
    <div class="one"></div>
</body>
</html>